<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/system/common/head.jsp"%>
<style>
    .labelTd{
        width:100px;
        text-align:right;
    }
</style>

<body>
<div id="p" class="easyui-panel" title="修改物业联系方式" style="padding: 10px; background: #fafafa;text-align:center;">
    <form id="updateForm" name="updateForm" method="post">

        <table class="infoTable">

            <tr>
                <td class="labelTd">
                    联系方式<span class="colrRed"> * </span>：
                </td>
                <td >
                    <input type="text" id="contact" name="contact"
                           class="easyui-validatebox myinput"
                           required="true"
                           missingMessage="请输入联系方式"  placeholder="请输入联系方式"
                           value="${community.contact }"/>
                </td>
            </tr>
        </table>

        <div style="text-align:center;padding-top:10px;">
            <br />
            <a class="easyui-linkbutton myLink" iconCls="icon-ok"
               onclick="submitFrom()">修改</a>
            &nbsp;&nbsp;&nbsp;
            <a  class="easyui-linkbutton myLink" iconCls="icon-undo"
                onclick="resetForm()">重置 </a>
        </div>
    </form>
</div>
</body>

<script>
    //重置
    function resetForm() {
        $("#updateForm").form('reset');
    }

    //页面提交
    function submitFrom() {
        //判断参数是否为空
        var valid = $('#updateForm').form('validate');
        if (valid) {
            var param = $('#updateForm').serializeJson(true);
            $.axs("community/contact/update", param,
                function(data){
                    if(data.status == 1){
                        $.messager.alert("提示信息",
                            data.msg, 'info', function() {
                                parent.$('#tt').tabs('close', parent.$('#tt').tabs('getSelected').panel('options').title);
                            });
                    }else{
                        $.messager.alert("提示信息", data.msg, 'error');
                    }
                });

        }
    }

</script>
</html>